﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Animals
    {
        private string animal;

        public string Animal { get => animal; set => animal = value; }

        public void Eat()
        {
            Console.WriteLine("{0}干饭中...", this.animal);
        }

    }

    //爬树接口
    interface IClimb
    {
        void Climb();
    }
    //游泳接口
    interface ISwim
    {
        void Swim();
    }
    //猫
    class Cats : Animals, IClimb
    {
        public Cats()
        {
            this.Animal = "猫";
        }

        public void Climb()
        {
            Console.WriteLine("猫上树。");
        }
    }
    //狗
    class Dogs : Animals, ISwim
    {
        public Dogs()
        {
            this.Animal = "狗";
        }

        public void Swim()
        {
            Console.WriteLine("狗刨。");
        }
    }
    //鸭
    class Ducks : Animals, ISwim
    {
        public Ducks()
        {
            this.Animal = "鸭子";
        }

        public void Swim()
        {
            Console.WriteLine("鸭子划水。");
        }
    }
    //猴
    class Monkey : Animals, IClimb
    {
        public Monkey()
        {
            this.Animal = "猴";
        }

        public void Climb()
        {
            Console.WriteLine("猴子爬树。");
        }
    }
}
